<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./anime.js"></script>
</head>
<style>
    *{
        padding: 0;
        margin: 0;
    }
    .target{
        width: 50px;
        height: 50px;
        background-color: red;
    }
</style>
<script>
    function Demo(){
        anime({
            targets:document.getElementsByClassName('target'),
            translateX: 140
        })
    }
</script>
<body>
    <div class="target" onclick="Demo()"> </div>
</body>

</html>